﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AEBaseCalcCSharp
{
    abstract class Structure : Building
    {
        protected int currentConstruction = 0;
        protected int currentEconomy = 0;
        protected int currentProduction = 0;

        public virtual int baseEconomy { get { return 0; } }
        public virtual int baseConstruction { get { return 0; } }
        public virtual int baseProduction { get { return 0; } }

        public abstract string structureName { get; }

        public override void incrementLevel(int newLevel)
        {
            this.level = newLevel;
            incrementCost();
            incrementEnergy();
            incrementConstruction();
            incrementArea();
            incrementPopulation();
            incrementProduction();
        }

        //Increment Level Methods:-
        protected void incrementConstruction()
        {
            currentConstruction = baseConstruction * level;
        }

        protected void incrementProduction()
        {
            currentProduction = baseProduction * level;
        }

        //Getters:-
        public int getCurrentEconomy()
        {
            return currentEconomy;
        }

        public virtual int getCurrentFertility()
        {
            return 0;
        }

        public string getStructureName()
        {
            return structureName;
        }
        
        public int getCurrentConstruction()
        {
            return currentConstruction;
        }

        public int getCurrentProduction()
        {
            return currentProduction;
        }
    }
}
